package com.wangijun.yuan.web.model.dto;

import com.wangijun.yuan.core.domain.Article;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class SearchParam extends PageParam<Article> {
    /*搜索内容*/
    @NotBlank(message = "搜索内容不可为空")
    private String text;
    @Schema(description = "最多阅读还是最新发布")
    OrderByEnum order;


    public enum OrderByEnum {
        // 最多阅读
        read_num,
        // 最近更新
        edit_time,

    }
}
